import request from '/@/utils/request';
import { AxiosRequestConfig } from 'axios';

//================================================================
// 获取摄像头设备列表 分页查询 /ITS/Camera/QueryPageList
export const CameraQueryPageList = (params?: object) => {
	return request({
		url: '/ITS/Camera/QueryPageList',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 摄像头设备 新增 /ITS/Camera/Add
export const CameraAdd = (params?: object) => {
	return request({
		url: '/ITS/Camera/Add',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 摄像头设备 编辑 /ITS/Camera/Update
export const CameraUpdate = (params?: object) => {
	return request({
		url: '/ITS/Camera/Update',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 摄像头设备 删除 /ITS/Camera/Delete
export const CameraDelete = (params?: object) => {
	return request({
		url: '/ITS/Camera/Delete',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 摄像头设备 启用或禁用设备
export const OpenOrCloseCamera = (params?: object) => {
	return request({
		url: '/ITS/Camera/UpdateDeviceStatus',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

//摄像头设备 详情
export const CameraDetail = (params?: object) => {
	return request({
		url: '/ITS/Camera/GetDetail',
		method: 'get',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 获取设备下拉列表
export const CameraDropDownList = (params?: object) => {
	return request({
		url: '/ITS/Camera/DropDownList',
		method: 'get',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 摄像头查询点播视频列表
export const getQueryDeviceVideoListApi = (params?: object) => {
	return request({
		url: '/ITS/Camera/QueryDeviceVideoList',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 查询设备录像文件列表
export const getQueryDeviceVideoFileListApi = (params?: object) => {
	return request({
		url: '/ITS/Camera/QueryDeviceVideoFileList',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 查询摄像头的媒体文件
export const getQueryMediaFileListApi = (params?: object) => {
	return request({
		url: 'ITS/ItsFile/QueryFilePageList',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 批量识别
export const getQueryBatchIdentificationApi = (params?: object) => {
	return request({
		url: '/ITS/Camera/ResolveImage',
		method: 'post',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 关闭解析
export const getStopResolveStreamApi = (params?: object) => {
	return request({
		url: '/ITS/Camera/StopResolveStream',
		method: 'get',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}

// 手动开启视频流解析
export const ManualResolveStream = (params?: object) => {
	return request({
		url: '/ITS/Camera/ManualResolveStream',
		method: 'get',
		data: params,
		multiPartFormData: false,
	} as AxiosRequestConfig);
}